<%@ page pageEncoding="UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<% String url = request.getParameter("url");  
int total = Integer.parseInt(request.getParameter("items"));
int pageSize = Integer.parseInt(request.getParameter("pageSize"));
%>
<pg:pager url="<%=url %>" items="<%=total %>" maxPageItems="<%=pageSize %>" maxIndexPages="15" export="currentPageNumber=pageNumber"> 
<pg:first> 
<a href="${pageUrl }">首页</a> 
</pg:first> 
<pg:prev> 
<a href="${pageUrl }">前一页</a> 
</pg:prev> 
<pg:pages> 
<c:choose> 
<c:when test="${currentPageNumber eq pageNumber}"> <font color="red">${pageNumber }</font> </c:when> 
<c:otherwise> <a href="${pageUrl }">${pageNumber }</a> </c:otherwise> 
</c:choose> 
</pg:pages> 
<pg:next> 
<a href="${pageUrl }">下一页</a> 
</pg:next> 
<pg:last> 
<a href="${pageUrl }">最后一页</a> 
</pg:last> 
</pg:pager> 